import requests
import re
import time

# 1.页面源代码
url = "https://www.jianwi.com/vodshow/7-----------.html"

resp = requests.get(url)
resp.close()

# 2、检索所需内容

obj = re.compile(r'<a class="mo-situ-name mo-fsxs-14px mo-coxs-center mo-comd-left mo-wrap-arow" href="(?P<herf>.*?)">'
                 r'(?P<title>.*?)</a><span class="mo-situ-desc mo-fsxs-12px mo-wrap-arow mo-text-muted mo-coxs-none mo-comd-block">'
                 r'(?P<actor>.*?)</span></li>',re.S)

context = obj.finditer(resp.text)
for i in context:
    print('电影：{0}'.format(i.group('title')))
    print('演员：{0}'.format(i.group('actor')))
    print('电影链接：{0}{1}'.format('https://www.jianwi.com/',i.group('herf').lstrip('/')))
    play = i.group('herf').lstrip('/').replace('voddetail','vodplay').replace('.html','-1-1.html')
    print('播放链接：{0}{1}'.format('https://www.jianwi.com/',play))
    time.sleep(1)
